<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>消息添加</title>
	<script>document.write('<script src="../../plugin/vue/js/import.js?' + Math.random() + '"><' + '/script>');</script>
    <script>_import("../../plugin/vue/js/before.js");</script>
</head>
<body>
	<div id="app" class="container" v-cloak>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="el-icon-circle-plus-outline mr5"></i>{{header}}</h3>
            </div>
            <div class="panel-body">
            	<el-form v-loading="loading" label-width="100px" class="w-newsadd">
            		<el-row>
					  <el-col :span="8">
				  		<el-form-item label="消息类型：">
				  		    <el-select v-model="msgType" placeholder="请选择" :disabled="oper=='read'">
	                            <el-option v-for="item in mtpOptions" :key="item.code" :label="item.code_desc" :value="item.code">
	                            </el-option>
	                        </el-select>
						 </el-form-item>
					  </el-col>
					  <el-col :span="8">
				  		 <el-form-item label="归属部门：" prop="options">
				  		  	<el-cascader  :options="cascaderdept.depts" v-model="cascaderdept.deptvalue"
								:show-all-levels="cascaderdeptOpt.showallevels" :change-on-select="cascaderdeptOpt.changeonselect"
								:filterable="cascaderdeptOpt.filterable"  :props="cascaderdeptOpt.defaultProps"
								:clearable="cascaderdeptOpt.clearable" @change="deptChg" :disabled="oper=='read'">
							</el-cascader>
						 </el-form-item>
					  </el-col>
					  <el-col :span="8">
					  	<el-form-item label="创建时间：">
						 	<el-date-picker v-model="createDate" :readonly="oper=='read'" type="date"  placeholder="选择日期"></el-date-picker>
						 </el-form-item>
					  </el-col>
					</el-row>					 
				     <el-form-item  label="标题：">
				      <el-input type="text" v-model="title" :readonly="oper=='read'" autocomplete="off"></el-input>
				     </el-form-item>				     
					 <el-form-item label="内容：">
					 <!--  
					    <el-input type="textarea" v-model="editorContent" :readonly="oper=='read'"></el-input>
					 -->
					       <vue-editor  id="editor" ref="edt" :editor-options="editorSettings"  v-model="editorContent" :use-custom-image-handler="true" @image-added="handleImageAdded"> </vue-editor>
					 
					 </el-form-item>					 
					 <!--  
					 <el-form-item label="上传：" v-if="oper!='read'">
					 	<div id="picker">点击上传</div>
					 </el-form-item>
					 -->
					<el-form-item label="上传：" v-if="oper!='read'">
					 
					 <el-upload class="avatar-uploader el-upload--text" 
					     :action="uploadUrl"
					    ref="upload"	   
					    :show-file-list="false" 
					    :on-success="handleFileSuccess" 
					    :on-error="handleFileError"
					    :before-upload="beforeUploadFile" 
					    :on-progress="uploadFileProcess"
					    :data="data">
					    <el-button size="small" type="primary">点击上传</el-button>
					    <div slot="tip" class="el-upload__tip">请保证上传文件不超过50M</div>
					  </el-upload>
					  <el-progress v-if="fileFlag" style="position: absolute;left:150px;top:10px;"  :percentage="fileUploadPercent"></el-progress>
					 </el-form-item>
					 <!-- 表格 -->
					 <el-collapse v-model="activeNames">
						 <el-form-item label="">
							  <el-collapse-item title="折叠/展开  " name="1">
							  	<filelist ref="flist" :args.sync="fileArgs" :deletable.sync="fdelable"></filelist>
							  </el-collapse-item>
					    </el-form-item>	  
						<el-form-item label="消息接收人：" class="w-bold" v-if="oper!='read'">  
						  <div class="tr">
						  	<treeselect multiple="true" class="c-sel-tree1" :options="recvrs" value-consists-of="LEAF_PRIORITY"  v-model="recvr"/>
						  </div>	
						 <!--
						  <el-collapse-item title="折叠/展开 " name="2">
						//       <comlist ref="clist" :args.sync="comArgs" :delable.sync="comDel"></comlist>
						     <comlist ref="clist" :args.sync="comArgs" delable></comlist>
						  </el-collapse-item>	
						  -->
						</el-form-item>   						  
					</el-collapse>
					
					 <el-form-item class="tc">
					    <el-button type="primary" v-if="oper!='read'" @Click="save">保存</el-button>
					    <el-button type="primary" @Click="back">返回</el-button>
					  </el-form-item>
				</el-form>
            </div>
        </div>
   </div>         

<!-- 
<script>
   _import("../../plugin/vue/js/other.js");
</script>
 -->
<script>
    _import("../../plugin/vue/js/after.js");
</script> 
<script>_import("../../plugin/vue/js/treeselect/vue-treeselect.js");</script>  
<script>
    _import("../../plugin/vue/js/file/filelist.js");
</script>   
<script>
    _import("js/comlist.js");
</script>
 <script>
    _import("../../plugin/vue/js/editor/js/vue2-editor/vue2editor.js");
</script>
<script>
    _import("js/msgadd.js");
</script>
</body>
</html>